home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / util / misc / Fudgit233.lha / Source / Makefile < prev    next >
Encoding:
Makefile  |  1993-12-14  |  4.9 KB  |  167 lines

  1. ########################################
  2. # This is the Master Makefile for FUDGIT
  3. ########################################
  4. #
  5. # macro definitions
  6. # Change the following according to your needs
  7. # Where to put the program onced compiled.
  8. BINDIR=/usr/local/bin
  9. # Where to put the help file.
  10. # LIBDIR=/usr/local/lib
  11. LIBDIR=/ds13/c/users/lacasse/lib
  12. # Do you trust your optimizer?
  13. # OPT = -g # -DYYDEBUG
  14. OPT = 
  15. # Do you need safe or fast code? A bit safer not to use MACROPOP.
  16. # POP = -DMACROPOP # This is on
  17. POP = # This is off
  18. # Define the following "YES" or "NO DLLIB= DLAR=" if you want (or not) 
  19. # to compile the dynamic loading feature
  20. # (available on IRIX, ULTRIX, SUNOS only, ignored on others)
  21. DL = NO DLLIB= DLAR= # This is off
  22. # DL = YES # This is on
  23. # Do you want VI mode to be compiled?
  24. VI_MODE = # This is off
  25. # VI_MODE = -DVI_MODE  # This is on
  26. # Undefine -ll here if your OS does not need it for its standard lexer
  27. # This is the case for linux
  28. # IRIX and ULTRIX needs it. 
  29. # If you need it and it is undefined, ld(1) will complain about not
  30. # being able to find yywrap() or yysomething().
  31. # If you don't need it and it is defined, ld(1) will complain about not
  32. # being able to find the 'l' library ('l' stands for 'lex').
  33. LLFLAGS =  -ll # This is on
  34. # LLFLAGS = # This is off
  35. # Some shortcuts for me
  36. DATE = `cat Date`
  37. SRC = src
  38. SHELL = /bin/sh
  39. VERSION = 2.33
  40.  
  41. # You should not need to edit below this point except for 
  42. # choosing your favorite compiler. 
  43. # As it stands: you must use gcc on sun3 and the standard on others.
  44.  
  45. default:
  46.     @echo Use to make one of the following:
  47.     @echo
  48.     @echo " aix, datagen, hpux, linux, irix4, next, osf, sun3, sun4, ultrix"
  49.     @echo 
  50.     @echo And then type
  51.     @echo
  52.     @echo "    make install"
  53.     @echo
  54.     @echo Please read the \"Installation\" file first\!
  55.     @echo
  56.  
  57. aix:
  58.     (cd src; $(MAKE) CC="c89" LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  59.     POP="$(POP)" VI_MODE="$(VI_MODE)" -f Makefile.aix)
  60.  
  61. datagen:
  62.     (cd src; $(MAKE) CC="cc" LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  63.     POP="$(POP)" VI_MODE="$(VI_MODE)" -f Makefile.datagen)
  64.  
  65. hpux:
  66.     (cd src; $(MAKE) CC="c89" LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  67.     POP="$(POP)" VI_MODE="$(VI_MODE)" -f Makefile.hpux)
  68.  
  69. irix4:
  70.     (cd src; $(MAKE) CC="cc" LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  71.     POP="$(POP)" DL=$(DL) VI_MODE="$(VI_MODE)" -f Makefile.irix4)
  72.  
  73. next:
  74.     (cd src; $(MAKE) CC="cc" LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  75.     POP="$(POP)" VI_MODE="$(VI_MODE)" -f Makefile.next)
  76.  
  77. osf:
  78.     (cd src; $(MAKE) CC="cc" LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  79.     POP="$(POP)" VI_MODE="$(VI_MODE)" -f Makefile.osf)
  80.  
  81. sun3:
  82.     (cd src; $(MAKE) CC=gcc LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  83.     POP="$(POP)" DL=$(DL) VI_MODE="$(VI_MODE)" -f Makefile.sun3)
  84.  
  85. amiga:
  86.     (cd src; $(MAKE) CC=gcc LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  87.     POP="$(POP)" DL=$(DL) VI_MODE="$(VI_MODE)" -f Makefile.amiga)
  88.  
  89. sun4:
  90.     (cd src; $(MAKE) CC="gcc -W" LIBDIR="$(LIBDIR)" OPT="$(OPT)" \
  91.     POP="$(POP)" DL=$(DL) VI_MODE="$(VI_MODE)" -f Makefile.sun4)
  92.  
  93. ultrix:
  94.     (cd src; $(MAKE) CC="cc" LIBDIR="$(LIBDIR)" OPT="$(OPT)"\
  95.     POP="$(POP)" DL=$(DL) VI_MODE="$(VI_MODE)" -f Makefile.ultrix)
  96.  
  97. linux:
  98.     (cd src; $(MAKE) CC="cc" LIBDIR="$(LIBDIR)" OPT="$(OPT)"\
  99.     POP="$(POP)" VI_MODE="$(VI_MODE)" -f Makefile.linux)
  100.  
  101. install: help fudgit
  102.     cp fudgit $(BINDIR)    # Do not strip the executable if DL = YES
  103.     -if [ "$(DL)" = "YES" ] ;  then strip $(BINDIR)/fudgit ; fi
  104.     chmod 755 $(BINDIR)/fudgit
  105.     cp docs/fudgit.help $(LIBDIR)
  106.     chmod 644 docs/fudgit.help
  107.  
  108. help:
  109.     (cd docs; $(MAKE) LLFLAGS="$(LLFLAGS)" help)
  110.  
  111. doc:
  112.     (cd docs; $(MAKE) doc)
  113.  
  114. dist:
  115.     -rm -f fudgit_$(VERSION).tar.Z fudgit_$(VERSION).tar
  116.     #(cd docs; $(MAKE) fudgit.ps.Z; $(MAKE) ../Credits )
  117.     (cd docs; $(MAKE) LLFLAGS="$(LLFLAGS)" ../Credits )
  118.     ($(MAKE) cleanall)
  119.     (cd ..; tar cf fudgit_$(VERSION).tar \
  120.     Fudgit_$(VERSION)/[A-Z]* \
  121.     Fudgit_$(VERSION)/docs \
  122.     Fudgit_$(VERSION)/src \
  123.     Fudgit_$(VERSION)/tools \
  124.     Fudgit_$(VERSION)/examples ; \
  125.     compress -f fudgit_$(VERSION).tar; \
  126.     mv fudgit_$(VERSION).tar.Z Fudgit_$(VERSION))
  127.  
  128. NewVersion: Makefile cleanall
  129.     echo "Misc files:" > Contents
  130.     wc [A-Z]* docs/reference.tmpl \
  131.     docs/fudgit.tex docs/*.l docs/*.c tools/* >> Contents 
  132.     echo "Code: " >> Contents
  133.     wc src/Makefile* src/readline/Makefile* src/dl/Makefile* \
  134.     src/dld/Makefile* src/dld/dl/Makefile* \
  135.     src/*.[hcy] src/readline/*.[hc] src/dl/*.[hc] \
  136.     src/dld/*.[hc] src/dld/dl/*.[hc] >> Contents 
  137.     echo "Examples: " >> Contents
  138.     wc examples/* >> Contents 
  139.     # date > Date
  140.     echo $(VERSION) > Version
  141.  
  142. clean:
  143.     -/bin/rm -f core src/*.o src/*.u src/y.tab.h \
  144.     src/math.tab.h src/y.tab.c src/mathparse.c src/y.output src/yacc.*
  145.  
  146. cleanall:
  147.     -/bin/rm -f src/*.o src/core src/y.tab.h \
  148.     src/math.tab.h src/y.tab.c src/mathparse.c src/y.output src/yacc.*
  149.     -/bin/rm -f fudgit
  150.     -(cd docs; $(MAKE) cleanall)
  151.     -(cd src/readline; $(MAKE) clean)
  152.     -(cd src/dl; $(MAKE) clean)
  153.     -(cd src/dld; $(MAKE) clean)
  154.     -(cd src/dld/dl; $(MAKE) clean)
  155.     -(cd tools; $(MAKE) clean)
  156.  
  157. manual:
  158.     -(cd docs; $(MAKE) fudgit.ps)
  159.  
  160. bundle: cleanall
  161.     -compressdir .
  162.     -uncompress Makefile
  163.  
  164. unbundleall: 
  165.     -uncompressdir .
  166.  
  167.